package org.carabiner.infinitest;

import java.util.Date;

import javax.swing.JFrame;
import javax.swing.JTree;
import javax.swing.tree.TreeModel;

public class FrameUpdater implements TestStatusListener
{
  private JFrame frame;
  private JTree tree;

  public FrameUpdater(JFrame mainFrame, JTree resultTree)
  {
    tree = resultTree;
    frame = mainFrame;
  }

  public void testCaseSucceeded(TestEvent event)
  {
    processEvent(event);
  }

  public void testError(TestEvent event)
  {
    processEvent(event);
  }

  public void testFailed(TestEvent event)
  {
    processEvent(event);
  }

  public void testMethodSucceeded(TestEvent event)
  {
    processEvent(event);
  }
  
  private void processEvent(TestEvent e)
  {      
    
  }

  private int getTestCaseCount()
  {
    TreeModel model = tree.getModel();
    return model.getChildCount(model.getRoot());    
  }  
}
